<?php
class WDisks extends CWidget {
	var $skin = 'defaultDisks';
	var $options = array();
	protected $data = array();
	
	public function init(){
		$default = array(
			'limit' => 6,
		);
		$this->options = array_merge($default, $this->options);
		
		$criteria = new CDbCriteria;
		$criteria->limit = $this->options['limit'];
		
		$this->data = Disk::model()->hit()->findAll($criteria);
		
		return parent::init();
	}
	
	public function run(){
		$this->render($this->skin);
	}
}